﻿using System;
using Microsoft.Xna.Framework;
using Terraria.Graphics.Shaders;

namespace Terraria.GameContent.Dyes
{
	// Token: 0x02000447 RID: 1095
	public class LegacyHairShaderData : HairShaderData
	{
		// Token: 0x060025BB RID: 9659 RVA: 0x0001A74B File Offset: 0x0001894B
		public LegacyHairShaderData() : base(null, null)
		{
			this._shaderDisabled = true;
		}

		// Token: 0x060025BC RID: 9660 RVA: 0x00489EE0 File Offset: 0x004880E0
		public override Color GetColor(Player player, Color lightColor)
		{
			bool flag = true;
			Color result = this._colorProcessor(player, player.hairColor, ref flag);
			if (flag)
			{
				return new Color(result.ToVector4() * lightColor.ToVector4());
			}
			return result;
		}

		// Token: 0x060025BD RID: 9661 RVA: 0x0001A75C File Offset: 0x0001895C
		public LegacyHairShaderData UseLegacyMethod(LegacyHairShaderData.ColorProcessingMethod colorProcessor)
		{
			this._colorProcessor = colorProcessor;
			return this;
		}

		// Token: 0x04004168 RID: 16744
		private LegacyHairShaderData.ColorProcessingMethod _colorProcessor;

		// Token: 0x02000448 RID: 1096
		// (Invoke) Token: 0x060025BF RID: 9663
		public delegate Color ColorProcessingMethod(Player player, Color color, ref bool lighting);
	}
}
